﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="CTSanPham.aspx.cs" Inherits="WebBanThuoc.CTSanPham" %>

<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
   
    <style>
      .style1{  padding-left: 10px;  width: 86px; vertical-align:top; color:#A6AC11}
</style>

 <style type="text/css">
       
       
        .ct_active {
            background: #E5EAC3 url("images/down1.png") no-repeat 3px 10px;
        }
       .ct_details {
            margin: 0px;padding:6px;
            float:left;
            width:580px;
            overflow:hidden;
            line-height:20px;
            font-size:13px;
        }
    
      .ct_title 
       {
           font-size: 14px; font-weight:600;
            color: #8DC50A;
            padding-left: 5px;
            border-bottom: 1px solid #E5EAC3;
             border-top: 1px solid #E5EAC3;
            cursor: pointer;
            background: url(images/bgtitle.png) repeat-x top left;
            float:left;
            width:590px;
            overflow:hidden;
            height:30px;
            line-height:30px;
        }
        /* .ct_title:hover
       {color: Black; background: #EAF794 url("images/down1.png") no-repeat 3px 10px;}*/
     </style>

     <script type="text/javascript">
       /*  $(document).ready(function () {
             $('.ct_details').hide();
             $("[name='ct_congdung']").show();
             $('.ct_title').click(function () {
                 $('.ct_active').removeClass('ct_active');
                 $('.ct_details').slideUp('normal');
                 if ($(this).next('.ct_details').is(':hidden') == true) {
                     $(this).addClass('ct_active');
                     $(this).next('.ct_details').slideDown('normal');
                 }
             });

         }); */


     </script>

 <%if (Session["sp"] != null)
  { WebBanThuoc.DTO.SanPham sp= Session["sp"] as WebBanThuoc.DTO.SanPham; %>
    <script type="text/javascript">
        document.title = document.title + " - Sản Phẩm - " + "<%= sp.TenSanPham %>";
    </script>

    <div class="tran_nav">
    <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px; display:inline;">
          <a href="TrangChu.aspx" itemprop="url" >
            <span itemprop="title">Trang chủ</span>
          </a> <!--<font>&raquo;</font>-->
        </div>  
        <!--<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px;  display:inline;">
          <a href="ShowSanPham.aspx?action=advSearch" itemprop="url">
            <span itemprop="title">Sản phẩm</span>
          </a> 
        </div>  -->
        <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px; display:inline;">  
        <%if(Request.QueryString["action"]=="advSearch")
          {%>
            <%if(Request.QueryString["LSPChon"] != "0" && Request.QueryString["LSPChon"] != null)
            { %>  <a href="ShowSanPham.aspx?action=advSearch&LSPChon=<%=Request.QueryString["LSPChon"]%>&TenLSPChon=<%=Request.QueryString["TenLSPChon"]%>" itemprop="url">
                    <span itemprop="title"><%="<font>&raquo;</font>&nbsp" + Request.QueryString["TenLSPChon"]%></a>
             <% } else { %><font>&raquo;</font>
                  <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px;  display:inline;">
                  <a href="ShowSanPham.aspx?action=advSearch" itemprop="url">
                    <span itemprop="title">Sản phẩm</span>
                  </a> 
                </div>
              <%} %>
             <%if (Request.QueryString["tenSPChon"] != "" && Request.QueryString["tenSPChon"] !=null)
             { %>
               <a href="ShowSanPham.aspx?action=advSearch&tenSPChon=<%=Request.QueryString["tenSPChon"]%>" itemprop="url">
               <span itemprop="title"><%="<font>&raquo;</font>&nbsp" + Request.QueryString["tenSPChon"]%> </a>
              <% } %>
          <% } %>
          <%if(Request.QueryString["action"]=="timTheoDanhMuc")
              { %>
              <%if (Request.QueryString["LoaiSanPham"] != null){%>
                 <a href="ShowSanPham.aspx?action=timTheoDanhMuc&LoaiSanPham=<%=Request.QueryString["LoaiSanPham"]%>&MaLoaiSanPham=<%=Request.QueryString["MaLoaiSanPham"]%>" itemprop="url">
                <span itemprop="title"><%= "<font>&raquo;</font>&nbsp" + Request.QueryString["LoaiSanPham"]%></span></a>
                <% } %>
              <% } %>
        </div><font>&raquo;</font>
        <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px;  display:inline;">
          <span itemprop="title"><%=sp.TenSanPham%></span>
        </div>
        
   </div> <!--tran_nav-->


    
   <div class="ct_product_info" >
   <div class="product_title" align="left" style="margin:0px"><h1><%=sp.TenSanPham%></h1></div>
              <%  if(Session["listHinh"]!=null)
              {
                  System.Collections.Generic.List<WebBanThuoc.DTO.HinhAnh> listHinh = Session["listHinh"] as System.Collections.Generic.List<WebBanThuoc.DTO.HinhAnh>; %>
                   <div class="mainPhoto"  
                        onmouseout="VietAd_HideTooltip();" onmouseover="VietAd_ShowTooltip('tooltip.aspx?hinh=<%=listHinh[0].DuongDan %>'); return false" >
                     <img title="<%=listHinh[0].ChuThich %>" style='float:right; max-height:145px; max-width:105px; margin-top:5px; margin-right:10px' src="<%=listHinh[0].DuongDan %>" alt='No Picture' />
                   </div> <!----photos --->
              <% } %><!--end of if (Session["listHinh"]!=null) -->
<div class="briefInfo">
        <table width="435"  border="0" cellpadding="2" style="text-align:left; padding:5px;">
          <tr style="line-height:22px;" ><td colspan="2" style="padding-left:8px; color:#8DC50A; font-weight:600" ><%=sp.MoTa%></td></tr>
          <tr style="line-height:22px;" >
            <td valign="top" class="style1">Giá bán: </td>
            <td width="202" style="color:#FF1F78; font-weight:bold"><%=sp.GiaBan.ToString("0#,0.##") + "&nbsp;VNĐ"%></td>
          </tr>
          <% if (sp.GiaDaGiam < sp.GiaBan)
             { %>
          <tr style="line-height:22px;" >
            <td valign="top" class="style1" >Giá đã giảm: </td>
            <td style="color:#FF1F78; font-weight:bold"><%=sp.GiaDaGiam.ToString("0#,0.##")+ "&nbsp;VNĐ"%>  </td>
          </tr>
          <% } %>
            <%= sp.KhuyenMai != ""? "<tr><td valign='top' class='style1'>Khuyến mãi:</td> <td>" + sp.KhuyenMai + "</td> </tr>" : ""%>
          <tr style="line-height:22px;" >
            <td valign="top"  class="style1">Tình trạng:</td>
            <td><%= sp.CoHang ==true ? "Còn hàng" : "Mời đặt hàng"%></td>
          </tr>
          <tr style="line-height:22px;" >
            <td valign="top" class="style1">Nhà sản xuất:</td>
            <td>
                <%if (Session["nsx"] != null)
                  {
                    WebBanThuoc.DTO.NhaSanXuat nsx = Session["nsx"] as WebBanThuoc.DTO.NhaSanXuat; %>
                    <%=nsx.TenNhaSanXuat%>
                <%} %>
            </td>
          </tr>
          <tr style="line-height:30px;">
            <td colspan="2">
              <span  class="cart_button_send" style="margin-left:10px; margin-top:5px" >
               <a id="link_muahang" style="text-decoration:none; color:Black" href="GioHang.aspx?maSanPham=<%= sp.MaSanPham %>" ><%= sp.CoHang ==true ? "Mua hàng" : "Đặt hàng"%></a>
              </span>
            </td>
          </tr>
        </table>
</div> <!--briefInfo-->

 <div class="share">
            <ul style="list-style: none">
                <li style="float:left; display:list-item; margin-right: 20px; margin-left:6px; font-size:13px ">Chia sẻ cho bạn bè:</li>                                

                <li style="float:left; display:list-item; margin-right: 20px;">                

                    <!-- Place this tag where you want the share button to render. -->
                    <style type="text/css">
                        #___plus_0
                        {
                            float:right;    
                        }
                    </style>
                    <div class="g-plus" data-action="share" data-annotation="bubble" data-href="<%=Request.RawUrl%>" style="float:right"></div>
            
                    <!-- Place this tag after the last share tag. -->
                    <script type="text/javascript">
                        window.___gcfg = { lang: 'vi' };

                        (function () {
                            var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                            po.src = 'https://apis.google.com/js/plusone.js';
                            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
                        })();
                    </script>                    
                </li>
                <li style="float:left; display:list-item; margin-right: 20px; padding-top: 1px;">                
                    <div id="Div1"></div>
                    <%--<script>                        (function (d, s, id) {
                            var js, fjs = d.getElementsByTagName(s)[0];
                            if (d.getElementById(id)) return;
                            js = d.createElement(s); js.id = id;
                            js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
                            fjs.parentNode.insertBefore(js, fjs);
                        } (document, 'script', 'facebook-jssdk'));</script>
                    <fb:share-button type="button" href="<%//=Request.RawUrl%>" style="float:right;">
                    </fb:share-button>--%>
                    <a target="_blank" href="http://www.facebook.com/sharer.php?u=<%=Request.Url.AbsoluteUri%>" title="Chia sẻ trên Facebook">
                    <img alt="facebook_share" src="img/facebook_btn.gif" />
                    </a>
                </li>
                <li style="float:left; display:list-item; margin-right: 5px;">
                
                    <a href="https://twitter.com/share" class="twitter-share-button" data-url="<%=Request.Url%>" data-text="Link Hay">Tweet</a>
                    <script>
                        !function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = "//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); } } (document, "script", "twitter-wjs");
                    </script>
                
                </li>
            </ul>
        </div>
 </div> <!--product info-->

  <div class="product_info" style=" margin-top:15px; width:595px;">
        <div class="ct_title" >Công dụng</div>
        <div class="ct_details" name="ct_congdung"><%=sp.CongDung %></div>
         <div class="ct_title">Thành phần</div>
        <div class="ct_details"><%=sp.ThanhPhan %> </div>
         <div class="ct_title">Cách dùng</div>
        <div class="ct_details"> <%=sp.CachDung %></div>
      
    </div>
    
 
<% } // END OF if (sp !=null) %>



</asp:Content>